package com.tsing.cedap.rest.vo.reqVo;

import com.tsing.cedap.common.valid.AddGroup;
import com.tsing.cedap.common.valid.UpdateGroup;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Null;

/**
 * @author TheTsing
 * @create 2022-01-27 15:30
 */
@Getter
@Setter
@Accessors(chain = true)
public class MiniUpdateAddressReqVo {

    @ApiModelProperty("新增不填，修改必填：id")
    @Null(message = "新增时不能传入id", groups = {AddGroup.class})
    @NotBlank(message = "id不能为空", groups = {UpdateGroup.class})
    private String id;

    @NotBlank(message = "用户姓名不能为空", groups = {AddGroup.class})
    private String name;

    @NotBlank(message = "用户电话不能为空", groups = {AddGroup.class})
    private String phone;

    @NotBlank(message = "校区id不能为空", groups = {AddGroup.class})
    private String campusId;

    @NotBlank(message = "具体地址不能为空", groups = {AddGroup.class})
    private String address;

    @ApiModelProperty("顺序  越小优先级越高  默认1  0 表示默认地址")
    private Integer weight;

}
